


// 班尼 1110.61=20 point      20%=3.448point          =  24p  
// 万叶 增伤60% 减抗40% 200精通=8.7     = 10.3 + 8   = 27p
// 云先森 伤害值 1800 增伤20% 攻速12% 
// 申鹤 伤害值 4000 增伤25% 减抗15%
// 砂糖 增伤20=3.448 精通360=15  减抗40=8  = 26p

let data1 = [
    { rate:30, base: 950, atk: 1800 , basedmgAdd: 46.6},
    { rate:30, base: 950, atk: 2000 , basedmgAdd: 46.6},
    { rate:30, base: 950, atk: 2500 , basedmgAdd: 46.6 + 15},
    { rate:30, base: 950, atk: 3000 , basedmgAdd: 46.6 + 15 + 35},
    { rate:30, base: 950, atk: 3500 , basedmgAdd: 46.6 + 15 + 80},
    { rate:30, base: 950, atk: 4000 , basedmgAdd: 220}
]

data1.forEach(item => {
    let bnts = atkTs({...item, addFix:1110.61, addRate:20}).toFixed(2)
    let wyts = (dmgArrTs({...item, dmgAdd:60}) * jkTs(40)).toFixed(2)
    let yxsts = (dmgArrTs({...item, dmgAdd:20}) * dmgZhiTs({...item, dmgZhi:18000})).toFixed(2)
    let shts = (dmgArrTs({...item, dmgAdd:25}) * jkTs(15) * dmgZhiTs({...item, dmgZhi:4000})).toFixed(2)
    console.log({bnts, wyts,yxsts,shts});
})

function atkTs(props) {
    let {base, atk, addFix, addRate} = props;
    return (base*((addRate||0)/100) + atk + (addFix||0)) / atk
}

function dmgArrTs(props) {
    let {basedmgAdd, dmgAdd} = props;
    return (dmgAdd + basedmgAdd + 100) / (basedmgAdd + 100)
}

function dmgZhiTs(props) {
    let {dmgZhi, atk, rate} = props
    return (atk * rate + dmgZhi) / (atk * rate)
}

function jkTs(jk) {
    let tmp = {
        10: 1.111,
        15: 1.139,
        20: 1.167,
        30: 1.222,
        40: 1.278,
        50: 1.333,
        60: 1.389,
    }
    return tmp[jk]
}



